package com.eduhzy.ttw.commonsdk.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author xubo
 * @date 2018/7/30 14:41
 */
public class EntriesData implements Parcelable {


    /**
     * awardLevel : 0
     * createTime : 1533881854000
     * fileType : 2
     * hasVoted : 0
     * img : http://192.168.0.108:8299/r/cms/www/yxs/img/word.jpg
     * pvCount : 10
     * researchId : 757
     * researchWorksNo : NO.1
     * status : 0
     * unionName : 堂堂网
     * voteCount : 3
     * worksId : 6569
     * worksName : 黔之驴
     * worksSN : SN20180810221734
     */

    private int awardLevel;
    private long createTime;
    private int fileType;
    private int hasVoted;
    private String img;
    private int pvCount;
    private int researchId;
    private String researchWorksNo;
    private int status;
    private String unionName;
    private int voteCount;
    private int worksId;
    private String worksName;
    private String worksSN;
    /**
     * isShare : 0
     * userRight : {"couldUpdate":0,"couldUpload":0,"couldVote":0}
     */

    private int isShare;
    private UserRightBean userRight;

    public int getAwardLevel() {
        return awardLevel;
    }

    public void setAwardLevel(int awardLevel) {
        this.awardLevel = awardLevel;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public int getFileType() {
        return fileType;
    }

    public void setFileType(int fileType) {
        this.fileType = fileType;
    }

    public int getHasVoted() {
        return hasVoted;
    }

    public void setHasVoted(int hasVoted) {
        this.hasVoted = hasVoted;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public int getPvCount() {
        return pvCount;
    }

    public void setPvCount(int pvCount) {
        this.pvCount = pvCount;
    }

    public int getResearchId() {
        return researchId;
    }

    public void setResearchId(int researchId) {
        this.researchId = researchId;
    }

    public String getResearchWorksNo() {
        return researchWorksNo;
    }

    public void setResearchWorksNo(String researchWorksNo) {
        this.researchWorksNo = researchWorksNo;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getUnionName() {
        return unionName;
    }

    public void setUnionName(String unionName) {
        this.unionName = unionName;
    }

    public int getVoteCount() {
        return voteCount;
    }

    public void setVoteCount(int voteCount) {
        this.voteCount = voteCount;
    }

    public int getWorksId() {
        return worksId;
    }

    public void setWorksId(int worksId) {
        this.worksId = worksId;
    }

    public String getWorksName() {
        return worksName;
    }

    public void setWorksName(String worksName) {
        this.worksName = worksName;
    }

    public String getWorksSN() {
        return worksSN;
    }

    public void setWorksSN(String worksSN) {
        this.worksSN = worksSN;
    }

    public EntriesData() {
    }

    public int getIsShare() {
        return isShare;
    }

    public void setIsShare(int isShare) {
        this.isShare = isShare;
    }

    public UserRightBean getUserRight() {
        return userRight;
    }

    public void setUserRight(UserRightBean userRight) {
        this.userRight = userRight;
    }

    public static class UserRightBean implements Parcelable {
        /**
         * couldUpdate : 0
         * couldUpload : 0
         * couldVote : 0
         */

        private int couldUpdate;
        private int couldUpload;
        private int couldVote;

        public int getCouldUpdate() {
            return couldUpdate;
        }

        public void setCouldUpdate(int couldUpdate) {
            this.couldUpdate = couldUpdate;
        }

        public int getCouldUpload() {
            return couldUpload;
        }

        public void setCouldUpload(int couldUpload) {
            this.couldUpload = couldUpload;
        }

        public int getCouldVote() {
            return couldVote;
        }

        public void setCouldVote(int couldVote) {
            this.couldVote = couldVote;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.couldUpdate);
            dest.writeInt(this.couldUpload);
            dest.writeInt(this.couldVote);
        }

        public UserRightBean() {
        }

        protected UserRightBean(Parcel in) {
            this.couldUpdate = in.readInt();
            this.couldUpload = in.readInt();
            this.couldVote = in.readInt();
        }

        public static final Creator<UserRightBean> CREATOR = new Creator<UserRightBean>() {
            @Override
            public UserRightBean createFromParcel(Parcel source) {
                return new UserRightBean(source);
            }

            @Override
            public UserRightBean[] newArray(int size) {
                return new UserRightBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.awardLevel);
        dest.writeLong(this.createTime);
        dest.writeInt(this.fileType);
        dest.writeInt(this.hasVoted);
        dest.writeString(this.img);
        dest.writeInt(this.pvCount);
        dest.writeInt(this.researchId);
        dest.writeString(this.researchWorksNo);
        dest.writeInt(this.status);
        dest.writeString(this.unionName);
        dest.writeInt(this.voteCount);
        dest.writeInt(this.worksId);
        dest.writeString(this.worksName);
        dest.writeString(this.worksSN);
        dest.writeInt(this.isShare);
        dest.writeParcelable(this.userRight, flags);
    }

    protected EntriesData(Parcel in) {
        this.awardLevel = in.readInt();
        this.createTime = in.readLong();
        this.fileType = in.readInt();
        this.hasVoted = in.readInt();
        this.img = in.readString();
        this.pvCount = in.readInt();
        this.researchId = in.readInt();
        this.researchWorksNo = in.readString();
        this.status = in.readInt();
        this.unionName = in.readString();
        this.voteCount = in.readInt();
        this.worksId = in.readInt();
        this.worksName = in.readString();
        this.worksSN = in.readString();
        this.isShare = in.readInt();
        this.userRight = in.readParcelable(UserRightBean.class.getClassLoader());
    }

    public static final Creator<EntriesData> CREATOR = new Creator<EntriesData>() {
        @Override
        public EntriesData createFromParcel(Parcel source) {
            return new EntriesData(source);
        }

        @Override
        public EntriesData[] newArray(int size) {
            return new EntriesData[size];
        }
    };
}
